home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / lib / dpkg / dpkg-gettext.pl next >
Encoding:
Perl Script  |  2007-03-06  |  476 b   |  38 lines

  1. #!/usr/bin/perl -w
  2. use strict;
  3. use warnings;
  4. # Copied from /usr/share/perl5/Debconf/Gettext.pm
  5.  
  6. use strict;
  7.  
  8. BEGIN {
  9.     eval 'use Locale::gettext';
  10.     if ($@) {
  11.         eval q{
  12.             sub _g {
  13.                 return shift;
  14.             }
  15.             sub textdomain {
  16.             }
  17.             sub ngettext {
  18.                 if ($_[2] == 1) {
  19.                     return $_[0];
  20.                 } else {
  21.                     return $_[1];
  22.                 }
  23.             }
  24.         };
  25.     } else {
  26.         eval q{
  27.             sub _g {
  28.                 return gettext(shift);
  29.             }
  30.         };
  31.     }
  32. }
  33.  
  34. use base qw(Exporter);
  35. our @EXPORT=qw(_g textdomain ngettext);
  36.  
  37. 1;
  38.